package snmp

import (
	"github.com/gosnmp/gosnmp"
	"time"
)

type BaseQuery struct {
	Device    string             `json:"device"`
	Port      uint16             `json:"port"`
	Community string             `json:"community"`
	Version   gosnmp.SnmpVersion `json:"version"`
	TimeoutMs time.Duration      `json:"timeoutMs"`
	Retries   int                `json:"retries"`
}
type Query struct {
	BaseQuery
	OIDs []string `json:"oids"`
}

type BulkQuery struct {
	BaseQuery
	OIDs           []string `json:"oids"`
	NonRepeaters   uint8    `json:"nonRepeaters"`
	MaxRepetitions uint32   `json:"maxRepetitions"`
}

type WalkQuery struct {
	BaseQuery
	OID string `json:"oid"`
}

type PDU struct {
	OID   string `json:"oid"`
	Type  string `json:"type"`
	Value any    `json:"value"`
}

type Result struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data []*PDU `json:"data"`
}
